<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <div id="app">
            <p ref="p1">{{msg}}</p>
        </div>

        <script src="../../dist/vue.js"></script>

        <script>
            const vm = new Vue({
                el: '#app',
                data: {
                    msg: 'hello',
                    name: 'vue',
                    title: 'title'
                },
                mounted() {
                    this.msg = 'hello world';
                    this.name = 'hello snabbdom';
                    this.title = 'vue.js';

                    console.log(this.$refs.p1.textContent);

                    // this.$nextTick(() => {
                    //     console.log(this.$refs.p1.textContent);
                    // });
                }
            });
        </script>
    </body>
</html>
